home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 7
/
Amiga Format AFCD07 (Dec 1996, Issue 91).iso
/
serious
/
shareware
/
3d
/
ts-imagine release2
/
ts-i rexx
/
texture_convert
< prev
next >
Wrap
Text File
|
1996-02-17
|
3KB
|
82 lines
/*-------------------------------------------------------------------------*/
/* TS-I ARexx interface Version 1.0 */
/* by Kevin Panton */
/*-------------------------------------------------------------------------*/
/* Initialise constants: a bit obvious I know but hey, gimme a break,*/
/* this is my first ARexx script after all. */
SourceFile$ = 'T:TEMPSOURCE'
DestDir$ = 'T:TEMPDEST'
Suffix$ = '.ATR'
ADDRESS COMMAND
/*-----------------------------------------------------*/
/*Open requester to select source----------------------*/
/*-----------------------------------------------------*/
'Requestfile RAM: TITLE "Source Texture_Studio settings" NOICONS >T:TEMPSOURCE'
/*-----------------------------------------------------*/
/*Open requester to select destination directory-------*/
/*-----------------------------------------------------*/
'Requestfile RAM: TITLE "Destination Imagine Attributes directory" DRAWERSONLY NOICONS >T:TEMPDEST'
/*-----------------------------------------------------*/
/*Read temporary source file into variable & trim------*/
/*-----------------------------------------------------*/
CALL Open(Source_Name, SourceFile$, 'r')
SOURCE$=ReadLn(Source_Name)
CALL Close(Source_Name)
SOURCE$=Centre(SOURCE$,Length(SOURCE$)-2)
/*-----------------------------------------------------*/
/*Read temporary destination Dir into variable & trim--*/
/*-----------------------------------------------------*/
CALL Open(Dest_Name, DestDir$, 'r')
DEST$=ReadLn(Dest_Name)
CALL Close(Dest_Name)
DEST$=Centre(DEST$,Length(DEST$)-2)
/*-----------------------------------------------------*/
/*Get the original filename & add suffix for Imagine---*/
/*-----------------------------------------------------*/
Excess = Lastpos('/',SOURCE$)
NewName$ = DelStr(SOURCE$,1,Excess)
LastName$ = DEST$||NewName$||Suffix$
/*-----------------------------------------------------*/
/*Now actually DO the conversion-----------------------*/
/*-----------------------------------------------------*/
'TS-I' SOURCE$ Lastname$ ' >NIL:'
/*-----------------------------------------------------*/
/*TIDY UP----------------------------------------------*/
/*-----------------------------------------------------*/
'DELETE T:TEMPSOURCE >NIL:'
'DELETE T:TEMPDEST >NIL:'
/*-----------------------------------------------------*/
EXIT